<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FabGL: ps2device.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">FabGL
   </div>
   <div id="projectbrief">ESP32 Display Controller and Graphics Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('ps2device_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle"><div class="title">ps2device.h</div></div>
</div><!--header-->
<div class="contents">
<a href="ps2device_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment">  Created by Fabrizio Di Vittorio (fdivitto2013@gmail.com) - &lt;http://www.fabgl.com&gt;</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment">  Copyright (c) 2019-2022 Fabrizio Di Vittorio.</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment">  All rights reserved.</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"></span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment"></span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment">* Please contact fdivitto2013@gmail.com if you need a commercial license.</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment"></span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment"></span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment">* This library and related software is available under GPL v3.</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment"></span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment">  FabGL is free software: you can redistribute it and/or modify</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="comment">  it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="comment">  the Free Software Foundation, either version 3 of the License, or</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="comment">  (at your option) any later version.</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="comment"></span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="comment">  FabGL is distributed in the hope that it will be useful,</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="comment">  but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="comment">  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="comment">  GNU General Public License for more details.</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="comment"></span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="comment">  You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="comment">  along with FabGL.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="comment"> */</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span><span class="preprocessor">#include &quot;freertos/FreeRTOS.h&quot;</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="preprocessor">#include &quot;freertos/semphr.h&quot;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span><span class="preprocessor">#include &quot;<a class="code" href="fabglconf_8h.html">fabglconf.h</a>&quot;</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span><span class="preprocessor">#include &quot;<a class="code" href="ps2controller_8h.html">ps2controller.h</a>&quot;</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span> </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span><span class="keyword">namespace </span>fabgl {</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#gab1e29a3412c837d0e4e7599473e8948f">   52</a></span><span class="keyword">enum class</span> <a class="code hl_enumeration" href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#gab1e29a3412c837d0e4e7599473e8948f">PS2DeviceType</a> {</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>  <a class="code hl_enumvalue" href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#ggab1e29a3412c837d0e4e7599473e8948fa896a8d33d48700b0acaeb7d8fd0f58a0">UnknownPS2Device</a>,             </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>  <a class="code hl_enumvalue" href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#ggab1e29a3412c837d0e4e7599473e8948fa45e3ba6c41a9110f3478fff0794acde1">OldATKeyboard</a>,                </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span>  <a class="code hl_enumvalue" href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#ggab1e29a3412c837d0e4e7599473e8948fa587da6d8dc703c1519c5f5878034d791">MouseStandard</a>,                </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span>  <a class="code hl_enumvalue" href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#ggab1e29a3412c837d0e4e7599473e8948fa7b1bf224080b249a7253c8c26f56b13f">MouseWithScrollWheel</a>,         </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span>  <a class="code hl_enumvalue" href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#ggab1e29a3412c837d0e4e7599473e8948faf1d7e419c78438778a0aff8adab862b5">Mouse5Buttons</a>,                </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span>  <a class="code hl_enumvalue" href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#ggab1e29a3412c837d0e4e7599473e8948faf538f76f49a8e36da8fc9c30ded61260">MF2KeyboardWithTranslation</a>,   </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span>  <a class="code hl_enumvalue" href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#ggab1e29a3412c837d0e4e7599473e8948facd84073eb44e25384b4dfab30e81d441">M2Keyboard</a>,                   </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>};</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span> </div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"><a class="line" href="classfabgl_1_1_p_s2_device.html">   70</a></span><span class="keyword">class </span><a class="code hl_class" href="classfabgl_1_1_p_s2_device.html">PS2Device</a> {</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="classfabgl_1_1_p_s2_device_ad71b1d9186542ee488f761280b7b76da.html#ad71b1d9186542ee488f761280b7b76da">   79</a></span>  <a class="code hl_enumeration" href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#gab1e29a3412c837d0e4e7599473e8948f">PS2DeviceType</a> <a class="code hl_function" href="classfabgl_1_1_p_s2_device_ad71b1d9186542ee488f761280b7b76da.html#ad71b1d9186542ee488f761280b7b76da">identify</a>() { <a class="code hl_enumeration" href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#gab1e29a3412c837d0e4e7599473e8948f">PS2DeviceType</a> result; send_cmdIdentify(&amp;result); <span class="keywordflow">return</span> result; };</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span>  <span class="keywordtype">bool</span> <a class="code hl_function" href="classfabgl_1_1_p_s2_device_aae07d4bbfd23897dc1225821077c8df2.html#aae07d4bbfd23897dc1225821077c8df2">lock</a>(<span class="keywordtype">int</span> timeOutMS);</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span> </div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classfabgl_1_1_p_s2_device_a9278be8203e1c42e2619179882ae4403.html#a9278be8203e1c42e2619179882ae4403">unlock</a>();</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span> </div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span>  <span class="keywordtype">bool</span> parityError();</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span> </div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span>  <span class="keywordtype">bool</span> syncError();</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span> </div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span>  <span class="keywordtype">bool</span> CLKTimeOutError();</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span> </div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>  <span class="keywordtype">bool</span> <a class="code hl_function" href="classfabgl_1_1_p_s2_device_a2cca4ba4bef3e1e010b7614be84323e3.html#a2cca4ba4bef3e1e010b7614be84323e3">sendCommand</a>(uint8_t cmd, uint8_t expectedReply);</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span> </div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classfabgl_1_1_p_s2_device_a2cca4ba4bef3e1e010b7614be84323e3.html#a2cca4ba4bef3e1e010b7614be84323e3">sendCommand</a>(uint8_t cmd);</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span> </div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classfabgl_1_1_p_s2_device_ac2516eb2086876de9d8abad203aea15c.html#ac2516eb2086876de9d8abad203aea15c">suspendPort</a>();</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span> </div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classfabgl_1_1_p_s2_device_ae5e89fd1fac0904104dfab776e4fb15c.html#ae5e89fd1fac0904104dfab776e4fb15c">resumePort</a>();</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span> </div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span>  uint16_t deviceID()    { <span class="keywordflow">return</span> m_deviceID; }</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span> </div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span> </div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno">  135</span><span class="keyword">protected</span>:</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span> </div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span>  PS2Device();</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>  ~PS2Device();</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span> </div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span>  <span class="keywordtype">void</span> quickCheckHardware();</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span> </div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span>  <span class="keywordtype">void</span> begin(<span class="keywordtype">int</span> PS2Port);</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span> </div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span>  <span class="keywordtype">int</span> dataAvailable();</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span>  <span class="keywordtype">int</span> getData(<span class="keywordtype">int</span> timeOutMS);</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span> </div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span>  <span class="keywordtype">void</span> requestToResendLastByte();</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span> </div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span>  <span class="keywordtype">bool</span> send_cmdLEDs(<span class="keywordtype">bool</span> numLock, <span class="keywordtype">bool</span> capsLock, <span class="keywordtype">bool</span> scrollLock);</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span>  <span class="keywordtype">bool</span> send_cmdEcho();</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span>  <span class="keywordtype">bool</span> send_cmdGetScancodeSet(uint8_t * result);</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno">  152</span>  <span class="keywordtype">bool</span> send_cmdSetScancodeSet(uint8_t scancodeSet);</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span>  <span class="keywordtype">bool</span> send_cmdIdentify(<a class="code hl_enumeration" href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#gab1e29a3412c837d0e4e7599473e8948f">PS2DeviceType</a> * result);</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span>  <span class="keywordtype">bool</span> send_cmdDisableScanning();</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span>  <span class="keywordtype">bool</span> send_cmdEnableScanning();</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span>  <span class="keywordtype">bool</span> send_cmdTypematicRateAndDelay(<span class="keywordtype">int</span> repeatRateMS, <span class="keywordtype">int</span> repeatDelayMS);</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span>  <span class="keywordtype">bool</span> send_cmdSetSampleRate(<span class="keywordtype">int</span> sampleRate);</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span>  <span class="keywordtype">bool</span> send_cmdSetDefaultParams();</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span>  <span class="keywordtype">bool</span> send_cmdReset();</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span>  <span class="keywordtype">bool</span> send_cmdSetResolution(<span class="keywordtype">int</span> resolution);</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span>  <span class="keywordtype">bool</span> send_cmdSetScaling(<span class="keywordtype">int</span> scaling);</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span> </div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span> </div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno">  165</span>  int16_t           m_PS2Port;</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno">  166</span>  int16_t           m_cmdTimeOut;</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span>  int16_t           m_cmdSubTimeOut;</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno">  168</span>  uint16_t          m_deviceID;       <span class="comment">// read by send_cmdIdentify()</span></div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno">  169</span>};</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno">  170</span> </div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno">  171</span> </div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno">  172</span> </div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span><span class="keyword">struct </span>PS2DeviceLock {</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span>  PS2DeviceLock(PS2Device * PS2Device) : m_PS2Device(PS2Device) { m_PS2Device-&gt;lock(-1); }</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span>  ~PS2DeviceLock() { m_PS2Device-&gt;unlock(); }</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span> </div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno">  177</span>  PS2Device * m_PS2Device;</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span>};</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span> </div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span> </div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span> </div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span> </div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span> </div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno">  184</span> </div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span> </div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span>} <span class="comment">// end of namespace</span></div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span> </div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span> </div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span> </div>
<div class="ttc" id="aclassfabgl_1_1_p_s2_device_a2cca4ba4bef3e1e010b7614be84323e3_html_a2cca4ba4bef3e1e010b7614be84323e3"><div class="ttname"><a href="classfabgl_1_1_p_s2_device_a2cca4ba4bef3e1e010b7614be84323e3.html#a2cca4ba4bef3e1e010b7614be84323e3">fabgl::PS2Device::sendCommand</a></div><div class="ttdeci">bool sendCommand(uint8_t cmd, uint8_t expectedReply)</div><div class="ttdoc">Sends a raw command to the PS/2 device and wait for reply.</div><div class="ttdef"><b>Definition:</b> <a href="ps2device_8cpp_source.html#l00167">ps2device.cpp:167</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_p_s2_device_a9278be8203e1c42e2619179882ae4403_html_a9278be8203e1c42e2619179882ae4403"><div class="ttname"><a href="classfabgl_1_1_p_s2_device_a9278be8203e1c42e2619179882ae4403.html#a9278be8203e1c42e2619179882ae4403">fabgl::PS2Device::unlock</a></div><div class="ttdeci">void unlock()</div><div class="ttdoc">Releases device from exclusive access.</div><div class="ttdef"><b>Definition:</b> <a href="ps2device_8cpp_source.html#l00097">ps2device.cpp:97</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_p_s2_device_aae07d4bbfd23897dc1225821077c8df2_html_aae07d4bbfd23897dc1225821077c8df2"><div class="ttname"><a href="classfabgl_1_1_p_s2_device_aae07d4bbfd23897dc1225821077c8df2.html#aae07d4bbfd23897dc1225821077c8df2">fabgl::PS2Device::lock</a></div><div class="ttdeci">bool lock(int timeOutMS)</div><div class="ttdoc">Gets exclusive access to the device.</div><div class="ttdef"><b>Definition:</b> <a href="ps2device_8cpp_source.html#l00091">ps2device.cpp:91</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_p_s2_device_ac2516eb2086876de9d8abad203aea15c_html_ac2516eb2086876de9d8abad203aea15c"><div class="ttname"><a href="classfabgl_1_1_p_s2_device_ac2516eb2086876de9d8abad203aea15c.html#ac2516eb2086876de9d8abad203aea15c">fabgl::PS2Device::suspendPort</a></div><div class="ttdeci">void suspendPort()</div><div class="ttdoc">Suspends PS/2 port driving the CLK line Low.</div><div class="ttdef"><b>Definition:</b> <a href="ps2device_8cpp_source.html#l00133">ps2device.cpp:133</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_p_s2_device_ad71b1d9186542ee488f761280b7b76da_html_ad71b1d9186542ee488f761280b7b76da"><div class="ttname"><a href="classfabgl_1_1_p_s2_device_ad71b1d9186542ee488f761280b7b76da.html#ad71b1d9186542ee488f761280b7b76da">fabgl::PS2Device::identify</a></div><div class="ttdeci">PS2DeviceType identify()</div><div class="ttdoc">Identifies the device attached to the PS2 port.</div><div class="ttdef"><b>Definition:</b> <a href="ps2device_8h_source.html#l00079">ps2device.h:79</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_p_s2_device_ae5e89fd1fac0904104dfab776e4fb15c_html_ae5e89fd1fac0904104dfab776e4fb15c"><div class="ttname"><a href="classfabgl_1_1_p_s2_device_ae5e89fd1fac0904104dfab776e4fb15c.html#ae5e89fd1fac0904104dfab776e4fb15c">fabgl::PS2Device::resumePort</a></div><div class="ttdeci">void resumePort()</div><div class="ttdoc">Resumes PS/2 port releasing CLK line.</div><div class="ttdef"><b>Definition:</b> <a href="ps2device_8cpp_source.html#l00139">ps2device.cpp:139</a></div></div>
<div class="ttc" id="aclassfabgl_1_1_p_s2_device_html"><div class="ttname"><a href="classfabgl_1_1_p_s2_device.html">fabgl::PS2Device</a></div><div class="ttdoc">Base class for PS2 devices (like mouse or keyboard).</div><div class="ttdef"><b>Definition:</b> <a href="ps2device_8h_source.html#l00070">ps2device.h:70</a></div></div>
<div class="ttc" id="afabglconf_8h_html"><div class="ttname"><a href="fabglconf_8h.html">fabglconf.h</a></div><div class="ttdoc">This file contains FabGL library configuration settings, like number of supported colors,...</div></div>
<div class="ttc" id="agroup___enumerations_gab1e29a3412c837d0e4e7599473e8948f_html_gab1e29a3412c837d0e4e7599473e8948f"><div class="ttname"><a href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#gab1e29a3412c837d0e4e7599473e8948f">fabgl::PS2DeviceType</a></div><div class="ttdeci">PS2DeviceType</div><div class="ttdoc">Represents the type of device attached to PS/2 port.</div><div class="ttdef"><b>Definition:</b> <a href="ps2device_8h_source.html#l00052">ps2device.h:52</a></div></div>
<div class="ttc" id="agroup___enumerations_gab1e29a3412c837d0e4e7599473e8948f_html_ggab1e29a3412c837d0e4e7599473e8948fa45e3ba6c41a9110f3478fff0794acde1"><div class="ttname"><a href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#ggab1e29a3412c837d0e4e7599473e8948fa45e3ba6c41a9110f3478fff0794acde1">fabgl::PS2DeviceType::OldATKeyboard</a></div><div class="ttdeci">@ OldATKeyboard</div></div>
<div class="ttc" id="agroup___enumerations_gab1e29a3412c837d0e4e7599473e8948f_html_ggab1e29a3412c837d0e4e7599473e8948fa587da6d8dc703c1519c5f5878034d791"><div class="ttname"><a href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#ggab1e29a3412c837d0e4e7599473e8948fa587da6d8dc703c1519c5f5878034d791">fabgl::PS2DeviceType::MouseStandard</a></div><div class="ttdeci">@ MouseStandard</div></div>
<div class="ttc" id="agroup___enumerations_gab1e29a3412c837d0e4e7599473e8948f_html_ggab1e29a3412c837d0e4e7599473e8948fa7b1bf224080b249a7253c8c26f56b13f"><div class="ttname"><a href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#ggab1e29a3412c837d0e4e7599473e8948fa7b1bf224080b249a7253c8c26f56b13f">fabgl::PS2DeviceType::MouseWithScrollWheel</a></div><div class="ttdeci">@ MouseWithScrollWheel</div></div>
<div class="ttc" id="agroup___enumerations_gab1e29a3412c837d0e4e7599473e8948f_html_ggab1e29a3412c837d0e4e7599473e8948fa896a8d33d48700b0acaeb7d8fd0f58a0"><div class="ttname"><a href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#ggab1e29a3412c837d0e4e7599473e8948fa896a8d33d48700b0acaeb7d8fd0f58a0">fabgl::PS2DeviceType::UnknownPS2Device</a></div><div class="ttdeci">@ UnknownPS2Device</div></div>
<div class="ttc" id="agroup___enumerations_gab1e29a3412c837d0e4e7599473e8948f_html_ggab1e29a3412c837d0e4e7599473e8948facd84073eb44e25384b4dfab30e81d441"><div class="ttname"><a href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#ggab1e29a3412c837d0e4e7599473e8948facd84073eb44e25384b4dfab30e81d441">fabgl::PS2DeviceType::M2Keyboard</a></div><div class="ttdeci">@ M2Keyboard</div></div>
<div class="ttc" id="agroup___enumerations_gab1e29a3412c837d0e4e7599473e8948f_html_ggab1e29a3412c837d0e4e7599473e8948faf1d7e419c78438778a0aff8adab862b5"><div class="ttname"><a href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#ggab1e29a3412c837d0e4e7599473e8948faf1d7e419c78438778a0aff8adab862b5">fabgl::PS2DeviceType::Mouse5Buttons</a></div><div class="ttdeci">@ Mouse5Buttons</div></div>
<div class="ttc" id="agroup___enumerations_gab1e29a3412c837d0e4e7599473e8948f_html_ggab1e29a3412c837d0e4e7599473e8948faf538f76f49a8e36da8fc9c30ded61260"><div class="ttname"><a href="group___enumerations_gab1e29a3412c837d0e4e7599473e8948f.html#ggab1e29a3412c837d0e4e7599473e8948faf538f76f49a8e36da8fc9c30ded61260">fabgl::PS2DeviceType::MF2KeyboardWithTranslation</a></div><div class="ttdeci">@ MF2KeyboardWithTranslation</div></div>
<div class="ttc" id="aps2controller_8h_html"><div class="ttname"><a href="ps2controller_8h.html">ps2controller.h</a></div><div class="ttdoc">This file contains fabgl::PS2Controller definition.</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_b741fed86bf5fa30eab98075f2fe4281.html">comdrivers</a></li><li class="navelem"><a class="el" href="ps2device_8h.html">ps2device.h</a></li>
    <li class="footer">Generated on Mon Aug 29 2022 13:52:04 for FabGL by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
  </ul>
</div>
</body>
</html>
